package com.cxf.server;

import org.apache.cxf.jaxws.JaxWsServerFactoryBean;

import com.cxf.service.HelloWorld;
import com.cxf.service.HelloWorldImpl;

public class Server {

	public static void main(String[] args) {
		System.out.println("webservice start...");
		HelloWorld implementor = new HelloWorldImpl();
		String address = "http://192.168.20.204:8080/helloWorld";
		JaxWsServerFactoryBean factoryBean = new JaxWsServerFactoryBean();
		factoryBean.setAddress(address);
		factoryBean.setServiceClass(HelloWorld.class);
		factoryBean.setServiceBean(implementor);
		factoryBean.create();
		System.out.println("webservice started.");
	}

}
